package logic.table;

import android.provider.BaseColumns;

import logic.constants.DefaultConsts;
import logic.util.logutil.LogUtil;


/**
 * 外卖列表
 * 
 * @author
 * @date 2014年8月11日 上午10:42:25
 */
public class OrderTakeoutTable
{
	public static final int    LOGIN_STATUS_LOGOUT = 0;
	public static final int    LOGIN_STATUS_LOGIN  = 1;
	
	public static final String table               = "lq_order_takeout";
	
	public final class OrderTakeoutColumns
	        implements
	        BaseColumns
	{
		public final static String COLUMN_ID      = "id";
		public final static String COLUMN_ACCOUNT = "account";
		public final static String COLUMN_SORTID  = "sortId";
		public final static String COLUMN_FOODID  = "foodId";
		public final static String COLUMN_PRICE   = "price";
		public final static String COLUMN_NUM     = "num";
	}
	
	public static String getCreateTableSQL() {
		StringBuilder sb = new StringBuilder();
		sb.append("CREATE TABLE IF NOT EXISTS " + table + "(");
		
		sb.append(OrderTakeoutColumns.COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT,");
		sb.append(OrderTakeoutColumns.COLUMN_ACCOUNT + " TEXT, ");
		sb.append(OrderTakeoutColumns.COLUMN_FOODID + " TEXT, ");
		sb.append(OrderTakeoutColumns.COLUMN_SORTID + " TEXT, ");
		sb.append(OrderTakeoutColumns.COLUMN_PRICE + " TEXT, ");
		sb.append(OrderTakeoutColumns.COLUMN_NUM + " TEXT");
		sb.append(");");
		LogUtil.d(DefaultConsts.TAG, table + ":" + sb.toString());
		return sb.toString();
	}
}
